﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="NewAlbum.aspx.cs" Inherits="Marta.buchalska.wesele.Admin.NewAlbum" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
   
    <asp:FormView runat="server" ID='GalleryView' DataSourceID="LinqDataSource1" 
        DefaultMode="Insert" DataKeyNames="ID">
        <EditItemTemplate>
            ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            Name:
            <asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            Photo_galleries:
            <asp:TextBox ID="Photo_galleriesTextBox" runat="server" 
                Text='<%# Bind("Photo_galleries") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            Name: <asp:TextBox ID="NameTextBox" Text='<%# Bind("Name") %>' runat="server"></asp:TextBox>
            <br />
            <asp:LinkButton runat="server" CommandName="Insert" ID="InsertButton" 
                CausesValidation="True" Text="Insert"></asp:LinkButton>
        &nbsp;
        </InsertItemTemplate>
        <ItemTemplate>
            ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            Name:
            <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            Photo_galleries:
            <asp:Label ID="Photo_galleriesLabel" runat="server" 
                Text='<%# Bind("Photo_galleries") %>' />
            <br />
        </ItemTemplate>
    </asp:FormView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="Marta.buchalska.wesele.DataModel.WeedingDBDataContext" 
        EntityTypeName="" TableName="Photo_categories" EnableInsert="True" 
        oninserted="LinqDataSource1_Inserted">
    </asp:LinqDataSource>
</asp:Content>
